package cn.shenlong.front.action;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import cn.shenlong.portal.domain.Site;
import cn.shenlong.portal.service.SiteService;

@Controller
public class DynamicPageAct {

	private static final Logger log = LoggerFactory
			.getLogger(DynamicPageAct.class);
	
	@Autowired
	private SiteService siteService;

	/**
	 * 首页
	 * 
	 * @param request
	 * @param model
	 * @return
	 */
	@RequestMapping(value = "/front/home", method = RequestMethod.GET)
	public String index(HttpServletRequest request, ModelMap model) {
		Site site = siteService.findByPK(1l); 
		model.addAttribute("site", site);
		log.info("login in index");
		return "/front/home";

	}
}
